package filter;

import java.util.HashSet;
import java.util.Set;

public abstract class FilterExpression<T> extends Filter<T> {

	protected final Set<Filter<T>> filters = new HashSet<Filter<T>>();

	protected FilterExpression<T> addFilter(Filter<T> filterOne, Filter<T> filterTwo) {
		Set<Filter<T>> newFilters = new HashSet<Filter<T>>();
		newFilters.add(filterOne);
		newFilters.add(filterTwo);
		filters.addAll(newFilters);
		return this;
	}
	protected FilterExpression<T> addFilter(Filter<T> filterOne) {
		filters.add(filterOne);
		return this;
	}
	
//	protected FilterExpression<T> addFilter(Filter<T>... multipleFilters) {
//		filters.addAll(Arrays.asList(multipleFilters));
//		return this;
//	}

	public abstract boolean matchesCriteria(T object);

}